<template>
  <div class="login">
    <CellGroup>
      <Field v-model="loginParams.phone" type="tel" label="手机号" />
      <Field v-model="loginParams.password" type="password" label="密码" />
      <Button @click="cellphoneHttps">登录</Button>
    </CellGroup>
  </div>
</template>

<script setup>
import { reactive } from "vue";
import { Button, Field, CellGroup } from "vant";
import { cellphone } from "@/apis/login/index.js";
const loginParams = reactive({
  phone: "",
  password: "",
});
const cellphoneHttps = async () => {
  let params = {
    ...loginParams
  };
  const res = await cellphone(params);
  console.log(res)
  localStorage.setItem('quanxian',"admin")
  localStorage.setItem('wy_token',res.token)
  localStorage.setItem('uid',res.account.id)
  localStorage.setItem('profile',JSON.stringify(res.profile))
};
</script>

<style>
</style>